package com.ruogu.codegeneration.utils;

import org.springframework.util.DigestUtils;

/**
 * 密码工具类
 *
 * @author ruogu
 */
public class PasswordUtil {
    /**
     * 密码盐值
     */
    final static String SALT = "ruogu";

    public  static final String DEFAULT_PASSWORD = "12345678";

    public static String getEncryptPassword(String userPassword) {
        // 混淆密码
        return DigestUtils.md5DigestAsHex((SALT + userPassword).getBytes());
    }

}
